(import-static (enter-monitor "System.Threading.Monitor.Enter"
			      (proc (object) void))
	       (exit-monitor "System.Threading.Monitor.Exit"
			      (proc (object) void)))

(define-imported-class symbol object)
(define-imported-class (keyword (string name) (string plain-name)) symbol)
(import-methods (to-string "ToString" (proc (object) string))
		(ends-with "EndsWith" (proc (string string) boolean)))

;;;
;;; SYMBOL.CS IS NO LONGER GENERATED FROM THIS FILE!!!!
;;;


;(define-module (lisp symbol)
;  (define-class (symbol pname plain-name) object
;    ("[Serializable]")
;    (define pname "name" (public string)  null)
;    (define plain-name (public "[NonSerialized]" string) null)

;    (define (to-string s) (public override string)
;      (pname s))

;    (define symbol-table (private static hashtable) (hashtable))

;    (define assignment-arrow (public static symbol) (intern "<-"))
;    (define lambda-arrow (public static symbol) (intern "->"))
;    (define s-and (public static symbol) (intern "and"))
;    (define s-begin (public static symbol) (intern "begin"))
;    (define s-body (public static symbol) (intern "body"))
;    (define s-colon (public static symbol) (intern ":"))
;    (define s-define (public static symbol) (intern "define"))
;    (define s-if (public static symbol) (intern "if"))
;    (define s-member (public static symbol) (intern "member"))
;    (define s-not (public static symbol) (intern "not"))
;    (define s-or (public static symbol) (intern "or"))
;    (define s-quote (public static symbol) (intern "quote"))
;    (define s-unquote (public static symbol) (intern "unquote"))
;    (define s-unquote-splicing (public static symbol) (intern "unquote-splicing"))
;    (define s-quasiquote (public static symbol) (intern "quasiquote"))
;    (define s-while (public static symbol) (intern "while"))
;    (define s-with (public static symbol) (intern "with"))
;    (define s-with-star (public static symbol) (intern "with*"))
;    (define s-with2 (public static symbol) (intern "with:"))
;    (define s-with-star2 (public static symbol) (intern "with*:"))
;    (define s-list (public static symbol) (intern "list"))
;    (define s-unnamed (public static symbol) (intern "<unnamed>"))
;    (define s-ellipsis (public static symbol) (intern "..."))
;    (define s-equal (public static symbol) (intern "="))
;    (define s-setter (public static symbol) (intern "setter"))
;    (define s-apply (public static symbol) (intern "apply"))
;    (define s-self (public static symbol) (intern "self"))
;    (define s-all (public static symbol) (intern "all"))

;    (define (add-synonym (string old-name) (string new-name))
;      (public static void)
;      (set (gethash symbol-table new-name)
;	   (intern old-name)))

;    (define (rename (string old-name) (string new-name))
;      (public static void)
;      (let ((sym (intern old-name)))
;	(set (gethash symbol-table new-name)
;	     sym)
;	(set (pname sym) new-name)))

;    (define (maybe-intern (string name)) (public static symbol)
;      (gethash symbol-table name))

;    (define (keyword-form (symbol s)) (public virtual property keyword)
;      (cast keyword (intern (string-append (pname s) ":"))))

;    (define (symbol-form (symbol s)) (public virtual property symbol)
;      s)

;    (define (intern (string name)) (public static symbol)
;      (enter-monitor (type->clr-type symbol))
;      (let ((probe (gethash symbol-table name))
;	    (result null))
;	(cond ((eq? probe null)
;	       (let ((sym (if (ends-with name ":")
;			      (keyword name name)
;			      (symbol name name))))
;		 (set (gethash symbol-table name)
;		      sym)
;		 (set result sym)))
;	      (else
;	       (set result probe)))
;	(exit-monitor (type->clr-type symbol))
;	result))))

(define-imported-class symbol object
  (define pname "name" (public)  string)
  (define plain-name (public) string)

  ;(define symbol-table (private static hashtable) (hashtable))


;  (define (add-synonym (string old-name) (string new-name))
;    (public static void)
;    (set (gethash symbol-table new-name)
;	 (intern old-name)))

;  (define (rename (string old-name) (string new-name))
;    (public static void)
;    (let ((sym (intern old-name)))
;      (set (gethash symbol-table new-name)
;	   sym)
;      (set (pname sym) new-name)))

;  (define (maybe-intern (string name)) (public static symbol)
;    (gethash symbol-table name))

  (define (keyword-form) (public property) keyword)
  (define (symbol-form) (public  property) symbol))

(define symbol (type-expression-value 'symbol))

(%import-object 'assignment-arrow "Symbol.sAssignmentArrow" symbol)
(%import-object 'lambda-arrow "Symbol.sLambdaArrow" symbol)
(%import-object 's-and "Symbol.sAnd" symbol)
(%import-object 's-begin "Symbol.sBegin" symbol)
(%import-object 's-body "Symbol.sBody" symbol)
(%import-object 's-colon "Symbol.sColon" symbol)
(%import-object 's-define "Symbol.sDefine" symbol)
(%import-object 's-if "Symbol.sIf" symbol)
(%import-object 's-member "Symbol.sMember" symbol)
(%import-object 's-not "Symbol.sNot" symbol)
(%import-object 's-or "Symbol.sOr" symbol)
(%import-object 's-quote "Symbol.sQuote" symbol)
(%import-object 's-unquote "Symbol.sUnquote" symbol)
(%import-object 's-unquote-splicing "Symbol.sUnquoteSplicing" symbol)
(%import-object 's-quasiquote "Symbol.sQuasiquote" symbol)
(%import-object 's-while "Symbol.sWhile" symbol)
(%import-object 's-with "Symbol.sWith" symbol)
(%import-object 's-with-star "Symbol.sWithStar" symbol)
(%import-object 's-with2 "Symbol.sWith2" symbol)
(%import-object 's-with-star2 "Symbol.sWithStar2" symbol)
(%import-object 's-list "Symbol.sList" symbol)
(%import-object 's-unnamed "Symbol.sUnnamed" symbol)
(%import-object 's-ellipsis "Symbol.sEllipsis" symbol)
(%import-object 's-equal "Symbol.sEqual" symbol)
(%import-object 's-setter "Symbol.sSetter" symbol)
(%import-object 's-apply "Symbol.sApply" symbol)
(%import-object 's-self "Symbol.sSelf" symbol)
(%import-object 's-all "Symbol.sAll" symbol)
(%import-object 's-list-of "Symbol.sListOf" symbol)

(import-static (intern "Symbol.Intern" (proc (string) symbol))
	       (maybe-intern "Symbol.MaybeIntern" (proc (string) symbol)))